import React from 'react';
import { Route } from 'react-router-dom';
import { connect } from 'react-redux';
import Header from '../views/container/Header';
import MainSidebar from '../views/container/MainSidebar';
import BearManage from '../views/modules/BearManage/BearManageRouter';
import ProjectManage from '../views/modules/ProjectManage';

const Routers = () => {
  return (
    <div>
      <div className="main-sidebar">
        <div className="main-title" data-flex="main:center cross:center">管理后台</div>
        {MainSidebar}
      </div>
      <div className="main-view">
        <Header />
        <div className="layout-container">
          <Route path="/wed/projectManage" component={ProjectManage} />
          <Route path="/wed/bearManage" component={BearManage} />
        </div>
      </div>
    </div>
  );
};

const mapStateToProps = function (state) {
  return {
    loading: state.Loading.display
  };
};


export default connect(mapStateToProps, { })(Routers);